<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="theme-color" content="#000000">
    <!--
      manifest.json provides metadata used when your web app is added to the
      homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>四六级一键查询</title>
    <meta id="description" name="description" itemprop="description" content="忘了四六级准考证号？莫慌，小家园帮你搞定～">    
    <meta name="share-icon" content="%PUBLIC_URL%/banner.jpg">
    <meta itemprop="image" content="%PUBLIC_URL%/banner.jpg" />
    <meta name="name" itemprop="name" content="家园工作室四六级一键查询"/>
    <!-- <script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastclick.js"></script>
    <script>
      if ('addEventListener' in document) {
        document.addEventListener('DOMContentLoaded', function() {
          FastClick.attach(document.body);
        }, false);
      }
      if(!window.Promise) {
        document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"'+'>'+'<'+'/'+'script>');
      }
    </script> -->
  </head>
  <body>
    <noscript>
      You need to enable JavaScript to run this app.
    </noscript>
    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
    <script>
      //获取页面高度
      var clientHeight = document.body.clientHeight;
      var focusElem = null;
      //设置监听聚焦事件
      function getTop(e){ 
        var offset=e.offsetTop; 
        if(e.offsetParent!=null) offset+=getTop(e.offsetParent); 
        return offset; 
      } 
      document.body.addEventListener("focus", function(e) {
          focusElem = e.target;
          if(window.appReady && e.target.tagName == 'INPUT') {
            var posY = getTop(focusElem) - 80;
            document.body.style.marginBottom = posY + 'px';
            document.body.scrollTop = posY;
            focusElem.addEventListener('blur', function(e) {
              document.body.style.marginBottom = 0;
              document.body.scrollTop = 0;
            })
          }
      }, true);
      //设置监听窗口变化时间
      window.addEventListener("resize", function() {
          if(focusElem && document.body.clientHeight < clientHeight) {
              //使用scrollIntoView方法来控制输入框
              focusElem.scrollIntoView(false);
          }
      });
    </script>
    <div style="display: none;">
      <script src="https://s13.cnzz.com/z_stat.php?id=1272947245&web_id=1272947245" language="JavaScript"></script>
    </div>
  </body>
</html>
